<?php global $user;
?>
<div class="user_content">
<?php
    if(isset($data->name)) {
        echo '<h3>Hello, '. $user->name . '</h3>';
    }

?>

<?php
    if(isset($data->name)) {
        echo '<a id="logout_link" href="' . base_path() . 'logout">Logout</a>';
    }
    else {
        echo '<a id="login_link" href="' . base_path() . 'user/login">Login</a>';
    }
?>
</div>
